<?php 
	include('header.php');
	
	if(isset($_POST['upload']))
	{
		$target_path = "docs/";
		$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 
		if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
    	echo "<span style=\"color:green; font-family:'Myriad Pro', sans-serif, helvetica; font-size:13px; font-weight:bold;\">The file ".  basename( $_FILES['uploadedfile']['name']). 
   		 " has been uploaded.</span><br /><span style=\"text-decoration:none; font-family:'Myriad Pro', sans-serif, helvetica; color:#284f74; font-size:13px; font-weight:bold;\">For reference and addition to the site, the file location is: admin/docs/".  basename( $_FILES['uploadedfile']['name']) . "</span>";
		} else{
    	echo "<span style=\"color:red; font-family:'Myriad Pro', sans-serif, helvetica; font-size:13px; font-weight:bold;\">There was an error uploading the file, please try again!</span>";
		}
	}
?>
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<span style="text-decoration:none; font-family:'Myriad Pro', sans-serif, helvetica; color:#284f74; font-size:13px; font-weight:bold;">Choose a file to upload:</span> <input name="uploadedfile" type="file" /><br /><br />
<input type="submit" value="Upload File" name="upload" style="background-color:#284f74; color:#FFFFFF; font-family:'Myriad Pro', sans-serif, helvetica; font-size:13px;"/>
</form>
</body>
</html>
